<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>对象版折线图</title>
    <style>
        canvas{
            border: 1px solid red;
        }
    </style>
</head>
<body>
    <canvas id="cvs" width="500" height="500"></canvas>
</body>
<!--引入划线的文件-->
<script src="js/line.js"></script>
<script>
    var cvs = document.getElementById("cvs");
    var ctx = cvs.getContext("2d");
    //创建对象
    var line = new Line(ctx,[ 10, 40, 70, 730, 100, 40, 1500, 2000, 300 ]);
    //调用绘图方法
    line.draw();
</script>
</html>